﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using Assist;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using YArchitech.LIB;
using YArchitech.LIB.YJKControls;
using HYFamilyLibDataManager;

namespace HYRElectric.Dimension
{
	internal partial class DlgSpaceTagInsert : System.Windows.Forms.Form
	{
		public DlgSpaceTagInsert(UIApplication uiApp)
		{
			this.m_application = uiApp;
			this.m_document = uiApp.ActiveUIDocument.Document;
			this.sysDB = FamilyLibDatabase.GetSqliteDB(SubjectType.System, uiApp.Application.VersionNumber);
			this.fInfo = Assist.FileUtil.GetTempDataFile();
			this.InitializeComponent();
			this.InitType();
			this.InitSelect();
		}

		private void InitSelect()
		{
		}

		private void InitType()
		{
			this.cbxSymbol.Items.Clear();
			foreach (DbFamily item in this.sysDB.CategoryTable["机械标记"]["空间标记"].GetAllFamilies(true, CheckType.All))
			{
				this.cbxSymbol.Items.Add(item);
			}
			if (this.cbxSymbol.Items.Count > 0)
			{
				this.cbxSymbol.SelectedIndex = 0;
			}
		}

		private void rbSingle_CheckedChanged(object sender, EventArgs e)
		{
		}

		private void rbSelection_CheckedChanged(object sender, EventArgs e)
		{
		}

		private void tbxTag_MouseClick(object sender, MouseEventArgs e)
		{
			if (this.tbxTag.Text == "<默认>")
			{
				this.tbxTag.Text = "";
			}
		}

		private void tbxTag_Leave(object sender, EventArgs e)
		{
			if (this.tbxTag.Text == "")
			{
				this.tbxTag.Text = "<默认>";
			}
		}

		private void btnOK(object sender, EventArgs e)
		{
		}

		private void rbtDoor_CheckedChanged(object sender, EventArgs e)
		{
		}

		private void rbtWin_CheckedChanged(object sender, EventArgs e)
		{
		}

		private void DlgSpaceTagInsert_Load(object sender, EventArgs e)
		{
			//base.Icon = Resource.YArchitechIcon;
		}

		private UIApplication m_application;

		private Document m_document;

		public FamilyLibDatabase sysDB;

		private FileInfo fInfo;
	}
}
